Method and system for approximating curve, and graphic display control method and apparatus

ABSTRACT

A method and system for approximating a curve, and a graphic display control method and apparatus are disclosed. The method for approximating a curve comprises the steps of acquiring number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve, acquiring coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points, and connecting the subdividing points with straight lines based on the coordinate information of the subdividing points. The invention could achieve efficient curve approximation and in turn achieve efficient graphic-display control.

TECHNICAL FIELD

The invention relates to graphic processing, and particularly relates to a method and apparatus for approximating a curve and a graphic display control method and apparatus.

BACKGROUND

In computer graphics applications, rendering characters is an important branch. Two-dimensional characters are generally formed by quadratic Bezier curves, cubic Bezier curves, and elliptical curves etc., in a two-dimensional plane.

It is inefficient, for a Graphics Display Controller (GDC) chip, to render curves pixel by pixel by tracking along the curves. With appropriate precision, it is reasonable to approximate a curve with straight lines. It is a tradeoff between precision and speed. For many applications of GDC chips, speed overwhelms precision, such as car navigation, mobile phone, and amusement displayer.

Approximating a curve with straight lines needs to firstly subdivide the curve with subdividing points, then calculate coordinates of the subdividing points, and finally connect adjacent subdividing points via straight lines. It is a long existing problem to approximate a curve. There exist many solutions to approximate Bezier curves, such as direct method, recursive subdivision, forward differencing, and hybrid method. However, these methods are not fast enough.

As Bezier curves are commonly represented by polynomials of parameter t (for example, x(t)=a·t²+b·t+c, y(t)=d·t²+e·t+f for quadratic Bezier curve, where the coefficients a, b, c, d, e, and f can be calculated by control points of the quadratic Bezier curve), the coordinate values of each subdividing point can be calculated directly, given the parameter t at each subdividing point. Although this method is simple and direct, it needs too many multiplications for each subdividing point.

Recursive subdivision is a recursive procedure, to find step by step subdividing points by calculating the middle points on each edge of a control polygon. Connecting adjacent subdividing points will form straight lines. Setting an appropriate threshold of flatness, the straight lines will approximate a curve with reasonable precision. However, the recursive procedure and calculating flatness will take a large amount of time.

Forward differencing is suitable for Bezier curves. The coordinate values of a next subdividing point can be got by adding the coordinate values of a previous subdividing point with difference values. With a fixed step, the coordinate values of each subdividing point can be calculated by just several addition operations. Therefore, the speed is very high. However, the number of the subdividing points (i.e. the step) needs to be determined before calculating the coordinates.

The hybrid method combines recursive subdivision and forward differencing together. It first uses recursive subdivision and flatness to obtains the parameter of each subdividing point, and then uses forward differencing to calculate the coordinate values of each subdividing point. This method is complex for implementation.

Therefore, a method and/or apparatus for approximating a curve, used in curve rendering and more efficient than the abovementioned methods, are needed.

SUMMARY OF THE INVENTION

In view of one or more of the above problems, this invention proposes a method and apparatus for approximating a curve and a graphic-display control method and apparatus.

The method for approximating a curve according to an aspect of the invention, comprising the steps of: acquiring number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; acquiring coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points; and connecting the subdividing points with straight lines based on the coordinate information of the subdividing points.

The apparatus for approximating a curve according to another aspect of the invention, comprising: a number acquiring unit configured to acquire number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; a coordinate acquiring unit configured to acquire coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points; and a curve approximating unit configured to connect the subdividing points with straight lines based on the coordinate information of the subdividing points.

The graphic-display control method according to still another aspect of the invention, comprising the steps of: acquiring number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; acquiring coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points; and connecting the subdividing points with straight lines based on the coordinate information of the subdividing points and drawing the straight lines connecting the subdividing points according to rendering parameters.

The graphic-display control apparatus according to still another aspect of the invention, comprising: a number acquiring unit configured to acquire number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; a coordinate acquiring unit configured to acquire coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points; and a curve rendering unit configured to connect the subdividing points with straight lines based on the coordinate information of the subdividing points and draw the straight lines connecting the subdividing points according to rendering parameters.

To sum up, the invention achieves efficient curve approximation and efficient graphic-display control by acquiring the number information of the subdividing points for subdividing a curve by means of using the coordinate information of the control points of the curve, acquiring the coordinate information of the subdividing points according to the number information of the subdividing points and the coordinate information of the control points.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention can be easily understood from the following description of the preferred embodiments of this invention in conjunction with the drawings, in which

FIG. 1 illustrates schematic diagrams of a quadratic Bezier curve, a cubic Bezier curve and an elliptical curve;

FIG. 2 illustrates schematic diagram of a relationship between an area difference and a subdividing step, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step with respect to X coordinate axis and the area of a line segment of two points corresponding to the subdividing step on the curve with respect to X coordinate axis;

FIG. 3 illustrates a conceptual schematic diagram of forward differencing for approximating a Bezier curve;

FIG. 4 illustrates a schematic diagram of the procedure for affine transforming a unit circle to acquire an ellipse;

FIG. 5 illustrates a block diagram of a graphic-display control apparatus according to an embodiment of the invention;

FIG. 6 illustrates a detailed block diagram of a subdivision module shown in FIG. 5; and

FIG. 7 illustrates a detailed block diagram of a coordinate calculation module shown in FIG. 5.

DESCRIPTIONS OF THE PREFERRED EMBODIMENTS

Features in respective aspects and exemplary embodiments of the invention will be described in detail below. In the following detailed description, a number of specific details are proposed to provide thorough understanding of the invention. However, it is obvious to those skilled in the art that the invention can be implemented without some of the specific details. The following descriptions of the embodiments are merely to provide better understanding of the invention by illustrating examples of the invention. The invention is not limited to any specific configuration and algorithm mentioned below, and covers any modification, substitution and improvement of the elements, components and algorithms without departing from the spirit of the invention. In the figures and the following description, well-known structures and techniques are not disclosed to avoid unnecessarily obscuring the invention.

FIG. 1 illustrates diagrams of a quadratic Bezier curve, a cubic Bezier curve and an elliptical curve. As shown in FIG. 1, the quadratic Bezier curve 102 has three control points: P₀(x₀, y₀), P₁(x₁, y₁) and P₂ (x₂, y₂); the cubic Bezier curve 104 has four control points: P₀(x₀, y₀), P₁(x₁, y₁), P₂ (x₂,y₂) and P₃ (x₃,y₃). These control points constitute a control polygon for each curve respectively. The elliptical curve 106 has a horizontal radius rh, a vertical radius rv, a starting angle θ₀, a terminating angle θ₁, a center point P_(c)(x_(c), y_(c)), a rotation angle rot and a symbol indicating whether the elliptical curve rotates counterclockwise (CCW) or clockwise (CW).

The parametrical equation of the quadratic Bezier curve is x(t)=(1−t)² x ₀+2t(1−t)x ₁ +t ² x ₂ y(t)=(1−t)² y ₀+2t(1−t)y ₁ +t ² y ₂  (1)

where 0≦t≦1. The parametrical equation of the quadratic Bezier curve can be set as another form: x(t)=a _(qx) t ² +b _(qx) t+c _(qx) y(t)=a _(qy) t ² +b _(qy) t+c _(qy)  (2)

where a_(qx)=x₂−2x₁+x₀, b_(qx)=2(x₁−x₀), c_(qx)=x₀, a_(qy)=y₂−2y₁+y₀, b_(qy)=2(y₁−y₀), and c_(qy)=y₀.

The parametrical equation of the cubic Bezier curve is x(t)=(1−t)³ x ₀+3t(1−t)² x ₁+3t ²(1−t)x ₂ +t ³ x ₃ y(t)=(1−t)³ y ₀+3t(1−t)² y ₁+3t ²(1−t)y ₂ +t ³ y ₃  (3)

where 0≦t≦1. The parametrical equations of the cubic Bezier curve can also be set as another form: x(t)=a _(cx) t ³ +b _(cx) t ² +c _(cx) t+d _(cx) y(t)=a _(cy) t ³ +b _(cy) t ² +c _(cy) t+d _(cy)  (4)

wherein a_(cx)=x₃−3x₂+3x₁−x₀, b_(cx)=3x₂−6x₁+3x₀, c_(cx)=3x₁−3x₀, d_(cx)=x₀, a_(cy)=y₃−3y₂+3y₁−y₀, b_(cy)=3y₂−6y₁+3y₀, c_(cy),=3y₁−3y₀ and d_(cy)=y₀.

The parametrical equation of the elliptical curve is

$\begin{matrix} {{\begin{bmatrix} x \\ y \\ 1 \end{bmatrix} = {\begin{bmatrix} {{rh} \cdot {\cos({rot})}} & {{- {rv}} \cdot {\sin({rot})}} & x_{c} \\ {{rh} \cdot {\sin({rot})}} & {{rv} \cdot {\cos({rot})}} & y_{c} \\ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} {\cos\;\theta} \\ {\sin\;\theta} \\ 1 \end{bmatrix}}},} & (5) \end{matrix}$

where θ is the parameter of any point on the elliptical curve, and rot is the rotation angle of the elliptical curve relative to the coordinate system. The elliptical curve can be regarded as a result of affine transforming a unit circle (cos θ, sin θ).

FIG. 2 illustrates a schematic diagram of a relationship between an area difference and a subdividing step, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step with respect to X coordinate axis and the area of a line segment of two points corresponding to the subdividing step on the curve with respect to X coordinate axis.

The area difference ΔA between the area of a curve segment corresponding to a subdividing step Δt with respect to X coordinate axis and the area of a line segment between two points corresponding to the subdividing step on the curve with respect to X coordinate axis can be obtained by the following expression: ΔA=A−A _(a),  (6)

where A is the area of the curve segment corresponding to Δt with respect to X coordinate axis, and A_(a) is the area of the line segment between two end points on the curve segment with respect to X coordinate axis.

If the curve segment is part of the quadratic Bezier curve, then there exist the following equations

$\begin{matrix} \begin{matrix} {A = {\int_{t}^{t + {\Delta\; t}}{{y(t)}\ {\mathbb{d}{x(t)}}}}} \\ {= {\int_{t}^{t + {\Delta\; t}}{\left( {{a_{qy}t^{2}} + {b_{qy}t} + c_{qy}} \right)\left( {{2a_{qx}t} + b_{qx}} \right){\mathbb{d}t}}}} \\ {= {{\frac{a_{qx}a_{qy}}{2}\Delta\; t^{4}} + {\left( {{2a_{qx}a_{qy}t} + \frac{{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}}{3}} \right)\Delta\; t^{3}} +}} \\ {{\begin{pmatrix} {{3a_{qx}a_{qy}t^{2}} +} \\ {{\left( {{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}} \right)t} +} \\ \frac{{b_{qx}b_{qy}} + {2a_{qx}c_{qy}}}{2} \end{pmatrix}\Delta\; t^{2}} + {\begin{pmatrix} {{2a_{qx}a_{qy}t^{3}} +} \\ {{\left( {{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}} \right)t^{2}} +} \\ {{\left( {{b_{qx}b_{qy}} + {2a_{qx}c_{qy}}} \right)t} +} \\ {b_{qx}c_{qy}} \end{pmatrix}\Delta\; t}} \end{matrix} & (7) \\ {and} & \; \\ \begin{matrix} {A_{a} = \frac{\left( {{y(t)} + {y\left( \;{t + {\Delta\; t}} \right)}} \right) \cdot \left( {{x\left( \;{t + {\Delta\; t}} \right)} - {x(t)}} \right)}{2}} \\ {= {\frac{1}{2}{\begin{pmatrix} {{a_{qy}t^{2}} + {b_{qy}t} + c_{qy} + {a_{qy}\left( \;{t + {\Delta\; t}} \right)}^{2} +} \\ {{b_{qy}\left( \;{t + {\Delta\; t}} \right)} + c_{qy}} \end{pmatrix} \cdot}}} \\ {\left( {{a_{qx}\left( {{\Delta\; t^{2}} + {2{t \cdot \Delta}\; t}} \right)} + {b_{qx}\Delta\; t}} \right)} \\ {= {{\frac{a_{qx}a_{qy}}{2}\Delta\; t^{4}} + {\left( {{2a_{qx}a_{qy}t} + \frac{{a_{qy}b_{qx}} + {a_{qx}b_{qy}}}{2}} \right)\Delta\; t^{3}} +}} \\ {{\begin{pmatrix} {{3a_{qx}a_{qy}t^{2}} +} \\ {{\left( {{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}} \right)t} +} \\ \frac{{b_{qx}b_{qy}} + {2a_{qx}c_{qy}}}{2} \end{pmatrix}\Delta\; t^{2}} + {\begin{pmatrix} {{2a_{qx}a_{qy}t^{3}} +} \\ {{\left( {{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}} \right)t^{2}} +} \\ {{\left( {{b_{qx}b_{qy}} + {2a_{qx}c_{qy}}} \right)t} +} \\ {b_{qx}c_{qy}} \end{pmatrix}\Delta\; t}} \end{matrix} & (8) \end{matrix}$

Therefore, the area difference between the area of the curve segment corresponding to Δt with respect to X coordinate axis and the area of the line segment between the two points on the curve segment corresponding to the subdividing step with respect to X coordinate axis is

$\begin{matrix} \begin{matrix} {{\Delta\; A} = {A - A_{a}}} \\ {= {\left( {\frac{{a_{qy}b_{qx}} + {2a_{qx}b_{qy}}}{3} - \frac{{a_{qy}b_{qx}} + {a_{qx}b_{qy}}}{2}} \right)\Delta\; t^{3}}} \\ {= {\frac{{a_{qx}b_{qy}} - {a_{qy}b_{qx}}}{6}\Delta\; t^{3}}} \\ {= {{Q \cdot \Delta}\; t^{3}}} \end{matrix} & (9) \end{matrix}$

As can be seen from the above expression, the area difference has no relationship with the parameter t, but with Δt. If ΔA is set to a threshold T, (5 pixels, for example), Δt can be obtained by the following expression:

$\begin{matrix} {{\Delta\; t} = {\sqrt[3]{\frac{T}{Q}}.}} & (10) \end{matrix}$

If the curve segment is part of the cubic Bezier curve, then there exist the following equations:

$\begin{matrix} {\begin{matrix} {A = {\int_{t}^{t + {\Delta\; t}}{{y(t)}\ {\mathbb{d}{x(t)}}}}} \\ {= {\int_{t}^{t + {\Delta\; t}}{\left( {{a_{cy}t^{3}} + {b_{cy}t^{2}} + {c_{cy}t} + d_{cy}} \right)\left( {{3a_{cx}t^{2}} + {2b_{cx}t} + c_{cx}} \right){\mathbb{d}t}}}} \\ {= {{\frac{a_{cx}a_{cy}}{2}\Delta\; t^{6}} + {\left( {{3a_{cx}a_{cy}t} + \frac{{3a_{cx}b_{cy}} + {2a_{cy}b_{cx}}}{5}} \right)\Delta\; t^{5}} +}} \end{matrix}\quad} & (11) \\ {\mspace{50mu}{{\left( {{\frac{15a_{cx}a_{cy}}{2}t^{2}} + {\left( {{2a_{cy}b_{cx}} + {3a_{cx}b_{cy}}} \right)t} + \frac{\begin{matrix} {{a_{cy}c_{cx}} +} \\ {{2b_{cx}b_{cy}} +} \\ {3a_{cx}c_{cy}} \end{matrix}}{4}} \right)\Delta\; t^{4}} +}} & \; \\ {{~~~~~~~~~~}{{\begin{pmatrix} {{10a_{cx}a_{cy}t^{3}} + {\left( {{4a_{cy}b_{cx}} + {6a_{cx}b_{cy}}} \right)t^{2}} + {\begin{pmatrix} {{a_{cy}c_{cx}} +} \\ {{2b_{cx}b_{cy}} +} \\ {3a_{cx}c_{cy}} \end{pmatrix}t} +} \\ \frac{{b_{cy}c_{cx}} + {2b_{cx}c_{cy}} + {3a_{cx}d_{cy}}}{3} \end{pmatrix}\Delta\; t^{3}} +}} & \; \\ {{~~~~~~~~~~}{{\begin{pmatrix} {{\frac{15a_{cx}a_{cy}}{2}t^{4}} + {\left( {{4a_{cy}b_{cx}} + {6a_{cx}b_{cy}}} \right)t^{3}} + {\frac{\begin{matrix} {{3a_{cy}c_{cx}} +} \\ {{6b_{cx}b_{cy}} +} \\ {9a_{cx}c_{cy}} \end{matrix}}{2}t^{2}} +} \\ {{\begin{pmatrix} {{b_{cy}c_{cx}} +} \\ {{2b_{cx}c_{cy}} +} \\ {3a_{cx}d_{cy}} \end{pmatrix}t} + \frac{{c_{cx}c_{cy}} + {2b_{cx}d_{cy}}}{2}} \end{pmatrix}\Delta\; t^{2}} +}} & \; \\ {{~~~~~~~~~~}{\begin{pmatrix} {{3a_{cx}a_{cy}t^{5}} + {\begin{pmatrix} {{2a_{cy}b_{cx}} +} \\ {3a_{cx}b_{cy}} \end{pmatrix}t^{4}} + {\begin{pmatrix} {{a_{cy}c_{cx}} +} \\ {{2b_{cx}b_{cy}} + {3a_{cx}c_{cy}}} \end{pmatrix}t^{3}} +} \\ {{\begin{pmatrix} {{b_{cy}c_{cx}} +} \\ {{2b_{cx}c_{cy}} + {3a_{cx}d_{cy}}} \end{pmatrix}t^{2}} + {\left( {{c_{cx}c_{cy}} + {2b_{cx}d_{cy}}} \right)t} + {c_{cx}d_{cy}}} \end{pmatrix}\Delta\; t}} & \; \\ {and} & \; \\ \begin{matrix} {A_{a} = \frac{\left( {{y(t)} + {y\left( \;{t + {\Delta\; t}} \right)}} \right) \cdot \left( {{x\left( \;{t + {\Delta\; t}} \right)} - {x(t)}} \right)}{2}} \\ {= {\frac{1}{2}{\begin{pmatrix} {{a_{cy}t^{3}} + {b_{cy}t^{2}} + {c_{cy}t} + d_{cy} + {a_{cy}\left( \;{t + {\Delta\; t}} \right)}^{3} +} \\ {{b_{cy}\left( \;{t + {\Delta\; t}} \right)}^{2} + {c_{cy}\left( \;{t + {\Delta\; t}} \right)} + d_{cy}} \end{pmatrix} \cdot}}} \\ {\left( {{a_{cx}\left( {{\Delta\; t^{3}} + {3{t \cdot \Delta}\; t^{2}} + {3\;{t^{2} \cdot \Delta}\; t}} \right)} + {b_{cx}\left( {{\Delta\; t^{2}} + {2{t \cdot \Delta}\; t}} \right)} + {c_{cx}\Delta\; t}} \right)} \\ {= {{\frac{a_{cx}a_{cy}}{2}\Delta\; t^{6}} + {\left( {{3a_{cx}a_{cy}t} + \frac{{a_{cx}b_{cy}} + {a_{cy}b_{cx}}}{2}} \right)\Delta\; t^{5}} +}} \end{matrix} & (12) \\ {{~~~~~~~~~~}{{\begin{pmatrix} {{\frac{15a_{cx}a_{cy}}{2}t^{2}} +} \\ {{\frac{{5a_{cy}b_{cx}} + {5a_{cx}b_{cy}}}{2}t} +} \\ \frac{{a_{cy}c_{cx}} + {b_{cx}b_{cy}} + {a_{cx}c_{cy}}}{2} \end{pmatrix}\Delta\; t^{4}} +}} & \; \\ {{~~~~~~~~~~}{{\begin{pmatrix} {{10a_{cx}a_{cy}t^{3}} + {\frac{{9a_{cy}b_{cx}} + {11a_{cx}b_{cy}}}{2}t^{2}} +} \\ {{\frac{{5a_{cx}c_{cy}} + {4b_{cx}b_{cy}} + {3a_{cy}c_{cx}}}{2}t} +} \\ \frac{{b_{cy}c_{cx}} + {b_{cx}c_{cy}} + {2a_{cx}d_{cy}}}{2} \end{pmatrix}\Delta\; t^{3}} +}} & \; \\ {{~~~~~~~~~~}{{\begin{pmatrix} {{\frac{15a_{cx}a_{cy}}{2}t^{4}} + {\left( {{4a_{cy}b_{cx}} + {6a_{cx}b_{cy}}} \right)t^{3}} +} \\ {{\frac{{3a_{cy}c_{cx}} + {6b_{cx}b_{cy}} + {9a_{cx}c_{cy}}}{2}t^{2}} +} \\ {{\left( {{b_{cy}c_{cx}} + {2b_{cx}c_{cy}} + {3a_{cx}d_{cy}}} \right)t} +} \\ \frac{{c_{cx}c_{cy}} + {2b_{cx}d_{cy}}}{2} \end{pmatrix}\Delta\; t^{2}} +}} & \; \\ {{~~~~~~~~~~}{\begin{pmatrix} {{3a_{cx}a_{cy}t^{5}} + {\left( {{2a_{cy}b_{cx}} + {3a_{cx}b_{cy}}} \right)t^{4}} +} \\ {{\left( {{a_{cy}c_{cx}} + {2b_{cx}b_{cy}} + {3a_{cx}c_{cy}}} \right)t^{3}} +} \\ {{\left( {{b_{cy}c_{cx}} + {2b_{cx}c_{cy}} + {3a_{cx}d_{cy}}} \right)t^{2}} +} \\ {{\left( {{c_{cx}c_{cy}} + {2b_{cx}d_{cy}}} \right)t} + {c_{cx}d_{cy}}} \end{pmatrix}\Delta\; t}} & \; \\ {{Then},} & \; \\ \begin{matrix} {{\Delta\; A} = {A - A_{a}}} \\ {= {{\left( \frac{{a_{cx}b_{cy}} - {a_{cy}b_{cx}}}{10} \right)\Delta\; t^{5}} + {\begin{pmatrix} {{\frac{{a_{cx}b_{cy}} - {a_{cy}b_{cx}}}{2}t} +} \\ \frac{{a_{cx}c_{cy}} - {a_{cy}c_{cx}}}{4} \end{pmatrix}\Delta\; t^{4}} +}} \\ {\begin{pmatrix} {{\frac{{a_{cx}b_{cy}} - {a_{cy}b_{cx}}}{2}t^{2}} +} \\ {{\frac{{a_{cx}c_{cy}} - {a_{cy}c_{cx}}}{2}t} +} \\ \frac{{b_{cx}c_{cy}} - {b_{cy}c_{cx}}}{6} \end{pmatrix}\Delta\; t^{3}} \end{matrix} & (13) \end{matrix}$

As Δt is between (0,1] under general conditions, two items Δt⁵

Δt⁴ can be omitted, then the above mentioned equation (13) becomes

$\begin{matrix} \begin{matrix} {{\Delta\; A} \approx {\begin{pmatrix} {{\frac{{a_{cx}b_{cy}} - {a_{cy}b_{cx}}}{2}t^{2}} +} \\ {{\frac{{a_{cx}c_{cy}} - {a_{cy}c_{cx}}}{2}t} + \frac{{b_{cx}c_{cy}} - {b_{cy}c_{cx}}}{6}} \end{pmatrix}\Delta\; t^{3}}} \\ {= {{{C(t)} \cdot \Delta}\;{t^{3}.}}} \end{matrix} & (14) \end{matrix}$

If the maximum value of

$\begin{matrix} \begin{matrix} {{C(t)} = {{\frac{{a_{cx}b_{cy}} - {a_{cy}b_{cx}}}{2}t^{2}} + {\frac{{a_{cx}c_{cy}} - {a_{cy}c_{cx}}}{2}t} + \frac{{b_{cx}c_{cy}} - {b_{cy}c_{cx}}}{6}}} \\ {= {{L \cdot t^{2}} + {M \cdot t} + N}} \end{matrix} & \; \end{matrix}$ can be obtained, then the abovementioned equation (14) will be ΔA≈C _(max) ·Δt ³  (15)

As in general cases, the scope of t is [0.0,1.0], to find the maximum value of C(t) is to find the maximum value of among t=0.0, t=1.0 and

$t = {- {\frac{M}{2L}.}}$ These three values are

$\begin{matrix} {{{val}_{t = 0} = \frac{{b_{x}c_{y}} - {b_{y}c_{x}}}{6}}{{val}_{t = 1} = {\frac{{a_{x}b_{y}} - {a_{y}b_{x}}}{2} + \frac{{a_{x}c_{y}} - {a_{y}c_{x}}}{2} + \frac{{b_{x}c_{y}} - {b_{y}c_{x}}}{6}}}{{val}_{t = {{- M}/{({2L})}}} = {{- \frac{M^{2}}{4L}} + N}}} & (16) \end{matrix}$

Therefore, C _(max)=max(val_(t=0),val_(t=1),val_(t=−M/(2L)))  (17)

Finally, if ΔA is set to a threshold T (5 pixels, for example), then the following expression will be gotten:

$\begin{matrix} {{\Delta\; t} = \sqrt[3]{\frac{T}{C_{\max}}}} & (18) \end{matrix}$

If the curve segment is part of the elliptical curve, which is centered at the original point of the coordinate system, and has no rotation relative to X coordinate axis, then there exist the following equations:

$\begin{matrix} \begin{matrix} {A = {\int_{t}^{t + {\Delta\; t}}{{y(t)}\ {\mathbb{d}{x(t)}}}}} \\ {= {\int_{t}^{t + {\Delta\; t}}{\left( {{rv}\;\sin\; t} \right)\left( {{- {rh}}\;\sin\; t} \right){\mathbb{d}t}}}} \\ {= {\frac{{rh} \cdot {rv}}{2}\begin{pmatrix} {{{\sin\left( \;{t + {\Delta\; t}} \right)}{\cos\left( \;{t + {\Delta\; t}} \right)}} -} \\ {{\sin\; t\;\cos\; t} - {\Delta\; t}} \end{pmatrix}}} \end{matrix} & (19) \\ {and} & \; \\ \begin{matrix} {A_{a} = \frac{\left( {{y(t)} + {y\left( \;{t + {\Delta\; t}} \right)}} \right) \cdot \left( {{x\left( \;{t + {\Delta\; t}} \right)} - {x(t)}} \right)}{2}} \\ {= \frac{\left( {{{rv}\;\sin\; t} + {{rv}\;{\sin\left( \;{t + {\Delta\; t}} \right)}}} \right) \cdot \left( {{{rh}\;{\cos\left( \;{t + {\Delta\; t}} \right)}} - {{rh}\;\cos\; t}} \right)}{2}} \\ {= {\frac{{rh} \cdot {rv}}{2}\begin{pmatrix} {{\sin\; t\;{\cos\left( \;{t + {\Delta\; t}} \right)}} - \;{\sin\; t\;\cos\; t} +} \\ {{{\sin\left( \;{t + {\Delta\; t}} \right)}{\cos\left( \;{t + {\Delta\; t}} \right)}} - {{\sin\left( \;{t + {\Delta\; t}} \right)}\cos\; t}} \end{pmatrix}}} \end{matrix} & (20) \\ {Then} & \; \\ \begin{matrix} {{\Delta\; A} = {A - A_{a}}} \\ {= {\frac{{rh} \cdot {rv}}{2}\left( {{\sin\;\Delta\; t} - {\Delta\; t}} \right)}} \end{matrix} & (21) \end{matrix}$

The absolute value of ΔA is

$\begin{matrix} \begin{matrix} {{{\Delta\; A}} = {\frac{{rh} \cdot {rv}}{2}\left( {{\Delta\; t} - {\sin\;\Delta\; t}} \right)}} \\ {= {\frac{{rh} \cdot {rv}}{2}\left( {{\Delta\; t} - \left( {{\Delta\; t} - \frac{\Delta\; t^{3}}{3!} + \frac{\Delta\; t^{5}}{5!} + \ldots} \right)} \right)}} \\ {\approx {\frac{{rh} \cdot {rv}}{2}\frac{\Delta\; t^{3}}{3!}}} \\ {= {\frac{{rh} \cdot {rv}}{12}\Delta\; t^{3}}} \\ {= {{E \cdot \Delta}\; t^{3}}} \end{matrix} & (22) \end{matrix}$

Finally, if ΔA is set to a threshold T, (5 pixels, for example), then

$\begin{matrix} {{\Delta\; t} = \sqrt[3]{\frac{T}{E}}} & (23) \end{matrix}$

After the subdividing step Δt is obtained, the number of the subdividing points can be obtained by the following expression: n=int(1/Δt)+1  (24)

As the elliptical curve can be obtained by affine transforming a unit circle curve, coordinate information of the subdividing points can be calculated on the unit circle curve. As the number n of the subdividing points has already been obtained and the angle of the circular arc on the unit circle curve corresponding to the elliptical curve is θ₁−θ₀ all, the angle difference between two adjacent subdividing points on the circular arc of the unit circle is (θ₁−θ₀)/n . From θ₀ to θ₁, the coordinates of each subdividing point on the circular arc are calculated according to x=cos θ and y=sin θ. Herein, the number of subdividing points on the circular arc of the unit circle is the same as that of the elliptical curve.

FIG. 3 illustrates a conceptual schematic diagram of forward differencing for approximating a Bezier curve. For any point P_(t+Δt) on the curve, the coordinate values can be calculated from the coordinate values of the previous point P_(t), given the curve length difference ΔP_(t), as follows: P _(t+Δt)=P_(t)+ΔP_(t)  (25)

If P_(t+Δt) is treated as parameter equations, then x(t+Δt)=x(t)+Δx(t) y(t+Δt)=y(t)+Δy(t)  (26)

If the curve is a quadratic Bezier curve, then Δx(t)=2(X ₁ −X ₀)Δt·t+(X ₁ −X ₀)Δ² t+2X ₀ Δt Δy(t)=2(Y ₁ −Y ₀)Δt·t+(Y ₁ −Y ₀)Δ² t+2Y ₀ Δt  (27)

where X₀=x₁−x₀, Y₀=y₁−y₀, X₁=x₂−x₁, and Y₁=y₂−y₁.

Similarly, Δx(t+Δt)=Δx(t)+Δ² x(t) Δy(t+Δt)=Δy(t)+Δ² y(t)  (28)

So, Δ² x(t)=Δ(Δx(t))=2(X ₁ −X ₀)Δ² t Δ² y(t)=Δ(Δy(t))=2(Y ₁ −Y ₀)Δ² t  (29)

If the curve is defined in iterative terms x_(n+1)=x_(n)+Δx_(n), Δx_(n)=Δx_(n−1)+Δ²x_(n−1), and y_(n+1)=y_(n)+Δy_(n), y_(n+1)=y_(n)+Δy_(n), then x_(n+1) and y_(n+1) can be obtained in an iterative way.

The coordinate values of the first subdividing point, Δx and Δy between the second and first subdividing points can be obtained by substituting the value of t on the first subdividing point into the expressions (1) and (27) respectively. Herein, the value of t can be, for example, 0.

If the curve is a cubic Bezier curve, then Δx(t)=3A _(x) Δt·t ²+3(A _(x)Δ² t+2B _(x) Δt)t+(A _(x)Δ³ t+3B _(x)Δ² t+3C _(x) Δt) Δy(t)=3A _(y) Δt·t ²+3(A _(y)Δ² t+2B _(y) Δt)t+(A _(y)Δ³ t+3B _(y)Δ² t+3C _(y) Δt)  (30)

where A_(x)=(X₂−X₁)−(X₁−X₀), B_(x)=(X₁−X₀), C_(x)=X₀, X₂=x₃−x₂, A_(y)=(Y₂−Y₁)−(Y₁−Y₀), B_(y)=(Y₁−Y₀), C_(y)=Y₀ and Y₂=y₃−y₂.

Likewise, Δ² x(t)=Δ(Δx(t))=6A _(x)Δ² t·t+6A _(x)Δ³ t+6B _(x)Δ² t Δ² y(t)=Δ(Δy(t))=6A _(y)Δ² t·t+6A _(y)Δ³ t+6B _(y)Δ² t  (31)

and Δ³ x(t)=Δ(Δ² x(t))=6A _(x)Δ³ t Δ³ y(t)=Δ(Δ² y(t))=6A _(y)Δ³ t  (32)

If the curve is defined in iterative terms x_(n+1)=x_(n)+Δx_(n), Δx_(n)=Δx_(n−1)+Δ²x_(n−1), Δ²x_(n−1)=Δ²x_(n−2)+Δ³x_(n−2), and y_(n+1)=y_(n)+Δy_(n), y_(n+1)=y_(n)+Δy_(n), Δ²y_(n−1)=Δ²y_(n−2)+Δ³y_(n−2), then x_(n+1) and y_(n+1) can be calculated in an iterative way. Likewise, the coordinate values of the first subdividing point, Δx and Δy between the second and first subdividing points, and Δ²x and Δ²y between the second and first subdividing points can be obtained by substituting the value of t on the first subdividing point into the expressions (3), (30) and (31) respectively. Herein, the value of t on the first subdividing point can be, for example, 0.

FIG. 4 illustrates a schematic diagram of the procedure for affine transforming a unit circle, with translation, rotation and scaling, to acquire an ellipse. The unit circle curve can be defined as (x(θ),y(θ),1)^(T)=(cos θ,sin θ,1)^(T), and the ellipse curve can be obtained by first subdividing the unit circle into points and then affine transforming the subdividing points. According to the coordinates (cos θ, sin θ,1)^(T) of the subdividing points on the unit circle arc and the equation (5), the coordinates (x, y,1)^(T) of an ellipse curve after affine transformation can be obtained through the following specific calculating formulas: x=rh·cos(rot)·cos θ−rv·sin(rot)·sin θ+x _(c) y=rh·sin(rot)·cos θ+rv·cos(rot)·sin θ+x _(c)  (33)

FIG. 5 illustrates a block diagram of a graphic-display control apparatus according to an embodiment of the invention. As shown in FIG. 5, the graphic-display control apparatus comprises a subdivision module (corresponding to the number acquiring unit) 502, a coordinate calculation module (corresponding to the coordinate acquiring unit) 504, and a rendering module (corresponding to the curve rendering unit) 506. A curve and rendering parameters are acquired by the graphic-display control apparatus from outside, and the curve is represented by its control points. Firstly, the subdivision module acquires number information of subdividing points for subdividing a curve by using coordinate information of control points of the curve. Secondly, the coordinate calculation module acquires the coordinate information of each subdividing point according to the number information of the subdividing points and the coordinate information of the control points, by using the method of forward difference when the curve is a Bezier curve or the method of affine transformation when the curve is an ellipse curve. Finally the rendering module connects the subdividing points by straight lines according to the coordinate information of each subdividing point and renders the straight lines connecting respective subdividing points by using the rendering parameters.

FIG. 6 illustrates a detailed block diagram of a subdivision module shown in FIG. 5. As shown in FIG. 6, the subdividing module calculates coefficients Q, C_(max) and E in a curve function according to the coordinate information of the control points of the curve input from outside, acquires the relationship between an area difference and a subdividing step based on the curve function, the area difference being the difference between the area of a curve segment corresponding to the subdividing step on the curve with respect to X coordinate axis and the area of a line segment of two points corresponding to the subdividing step on the curve with respect to X coordinate axis, calculates the subdividing step Δt according to the acquired relationship and a threshold input from outside, and calculates the number n of the subdividing points by using the subdividing step Δt.

FIG. 7 illustrates a detailed block diagram of a coordinate calculation module shown in FIG. 5. As shown in FIG. 7, the coordinate calculation module calculates the parameter difference Δt according to the number of the subdividing points, and calculates the coordinate information of the first subdividing point according to coordinate information of the control points. Then it calculates a curve difference ΔP between adjacent subdividing points for the Bezier curve, and calculates affine transformation coefficients for the ellipse curve. By using the difference value ΔP between adjacent subdividing points, it calculates the coordinate values of the subdividing points of the Bezier curve. By using the affine transformation coefficients, it affine transforms the subdividing points on the unit circle to the subdividing points on the ellipse curve. Finally, the coordinate values of each subdividing point are stored in an external memory for the rendering module.

To sum up, the invention acquires the number information of subdividing points for subdividing a curve by using coordinate information of control points of the curve, and then acquires coordinate information of the subdividing points according to the number information of the subdividing points and the coordinate information of the control points, thereby achieving high efficient curve approximation and further high efficient graphic-display control.

What needs to be noted is that respect modules and/or units shown in FIG. 5 can be implemented by using pre-programmed firmware or hardware component (for example ASIC) or by using data processing devices including EEPROM or other components.

Those skilled in the art will understand that there exist more optional embodiments and modifications for implementing the embodiments of this invention, and the above-mentioned embodiments and examples are only descriptions of one or more embodiments. Therefore, the scope of this invention is restricted only by the claims attached. 

What is claimed is:
 1. A method for approximating a curve implemented on an apparatus comprising a subdivision module and a coordination calculation module, the subdivision module and the coordination calculation module including at least one processor, the method comprising: acquiring, via a subdivision module, number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; acquiring, via a coordinate calculation module, coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points, wherein the subdividing points are points on the curve; and connecting the subdividing points with straight lines based on the coordinate information of the subdividing points, wherein acquiring the number information of the subdividing points comprises: acquiring a curve function of the curve based on the coordinate information of the control points; acquiring a relationship between an area difference and a subdividing step size based on the curve function, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step size on the curve with respect to an X coordinate axis and the area of a line segment of two points corresponding to the subdividing step size on the curve with respect to the X coordinate axis; calculating a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step; and calculating the number information of the subdividing points using the subdividing step size corresponding to the set area difference, wherein calculating a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step size comprises dividing the set area difference by a coefficient of the relationship between the area difference and the subdividing step.
 2. The method for approximating a curve of claim 1, wherein when the curve is a Bezier curve, the coordinate information of the subdividing points is acquired by forward differencing.
 3. The method for approximating a curve of claim 1, wherein when the curve is an elliptic curve, the coordinate information of the subdividing points is acquired by affine transforming.
 4. The method of claim 1, wherein the coefficient of the relationship is based on a type of the curve function.
 5. The method of claim 1, wherein calculating the number information of the subdividing points using the subdividing step size corresponding to the set area difference comprises dividing a length on the curve with respect to the X coordinate axis by the subdividing step size.
 6. The method of claim 1, wherein calculating the number information of the subdividing points using the subdividing step size corresponding to the set area difference comprises determining a number of subdividing steps of the subdividing step size in the curve with respect to the X coordinate axis.
 7. An apparatus for approximating a curve, comprising: a number acquiring unit configured to acquire number information of subdividing points for subdividing a curve needed to be approximated based on coordinate information of control points of the curve; a coordinate acquiring unit configured to acquire coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points, wherein the subdividing points are points on the curve; and a curve approximating unit configured to connect the subdividing points with straight lines based on the coordinate information of the subdividing points, wherein the number acquiring unit comprises: a curve function acquiring unit configured to acquire a curve function of the curve based on the coordinate information of the control points; a mutual relationship acquiring unit configured to acquire a relationship between an area difference and a subdividing step size based on the curve function, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step size on the curve with respect to an X coordinate axis and the area of a line segment of two points corresponding to the subdividing step size on the curve with respect to the X coordinate axis; a subdividing step acquiring unit configured to calculate a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step size by dividing the set area difference by a coefficient of the relationship between the area difference and the subdividing step; and a number information acquiring unit configured to calculate the number information of the subdividing points using the subdividing step size corresponding to the set area difference.
 8. The apparatus for approximating a curve of claim 7, wherein when the curve is a Bezier curve, the coordinate acquiring unit acquires the coordinate information of the subdividing points by forward differencing.
 9. The apparatus for approximating a curve of claim 7, wherein when the curve is an elliptic curve, the coordinate acquiring unit acquires the coordinate information of the subdividing points by affine transforming.
 10. An electronic graphic display control method implemented on an apparatus comprising a subdivision module and a coordinate calculation module, the subdivision module and the coordination calculation module including at least one processor, the method comprising: acquiring, via a subdivision module, number information of subdividing points for subdividing a curve needed to be rendered based on coordinate information of control points of the curve; acquiring, via a coordinate calculation module, coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points, wherein the subdividing points are points on the curve; and connecting the subdividing points with straight lines based on the coordinate information of the subdividing points and drawing the straight lines connecting the subdividing points according to rendering parameters, wherein acquiring the number information of the subdividing points comprises: acquiring a curve function of the curve based on the coordinate information of the control points; acquiring a relationship between an area difference and a subdividing step size based on the curve function, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step on the curve with respect to an X coordinate axis and the area of a line segment of two points corresponding to the subdividing step on the curve with respect to the X coordinate axis; calculating a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step size; and calculating the number information of the subdividing points using the subdividing step size corresponding to the set area difference, wherein calculating a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step size comprises dividing the set area difference by a coefficient of the relationship between the area difference and the subdividing step.
 11. A graphic display control apparatus comprising: a number acquiring unit configured to acquire number information of subdividing points for subdividing a curve needed to be rendered based on coordinate information of control points of the curve; a coordinate acquiring unit configured to acquire coordinate information of the subdividing points based on the number information of the subdividing points and the coordinate information of the control points, wherein the subdividing points are points on the curve; and a curve rendering unit configured to connect the subdividing points with straight lines based on the coordinate information of the subdividing points and draw the straight lines connecting the subdividing points according to rendering parameters, wherein the number acquiring unit comprises: a curve function acquiring unit configured to acquire a curve function of the curve based on the coordinate information of the control points; a mutual relationship acquiring unit configured to acquire a relationship between an area difference and a subdividing step size based on the curve function, wherein the area difference is the difference between the area of a curve segment corresponding to the subdividing step size on the curve with respect to an X coordinate axis and the area of a line segment of two points corresponding to the subdividing step on the curve with respect to the X coordinate axis; a subdividing step acquiring unit configured to calculate a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step; and a number information acquiring unit configured to calculate the number information of the subdividing points using the subdividing step size corresponding to the set area difference wherein calculating a subdividing step size corresponding to a set area difference based on the relationship between the area difference and the subdividing step size comprises dividing the set area difference by a coefficient of the relationship between the area difference and the subdividing step. 